﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>申请审批</title>
    <link href="css/themes/default/easyui.css" rel="stylesheet" />
    <link href="css/themes/icon.css" rel="stylesheet" />
    <link href="css/themes/color.css" rel="stylesheet" />
    <script src="../../../static/script/jquery.min.js"></script>
    <script src="../../../static/script/jquery.easyui.min.js"></script>
    <script src="../../../static/script/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript">
        $(function () {
            loadData();
            $("#btnSerach").click(function () {
                var pars = {
                    CreationUser:$("#CreationUser").val(),
                    CreationTime:$("#CreationTime").val(),
                    EndCreationTime: $("#EndTime").val(),                    
                    FedexSatu:$("#FedexSatu").val(),
                    FedexType: $("#FedexType").val(),
                    FedexArea: $("#FedexArea").val(),
                    FedexArea1: $("#FedexArea1").val()
                };
                loadData(pars);
            });
        });
        function loadData(pars) {
            $('#date').datagrid({
                url: '',
                //width: 1000,
                //height: 400,
                width: ($(window).width() * 0.90),
                height: ($(window).height() * 0.80),
                fitColumns: true, //列自适应
                nowrap: false,
                idField: 'Id',//主键列的列名
                loadMsg: '正在加载信息...',
                pagination: true,//是否有分页
                //singleSelect: false,//是否单行选择
                pageSize: 10,//每页多少条数据
                pageNumber: 1,//默认的页
                pageList: [10, 20, 30],
                queryParams: pars,//往后台传递参数
                columns: [[
                    { field: 'CreateUser', title: '申请人', align: 'center', width: 100 },
                    {
                        field: 'CreationTime', title: '申请时间', width: 100, align: 'center',
                        formatter: function (value, row, index) {
                            return (eval(value.replace(/\/Date\((\d+)\)\//gi, "new Date($1)"))).pattern("yyyy-M-d");
                        }
                    },
                    { field: 'CreateUser', title: '代填人', align: 'center', width: 100 },
                    { field: 'FedexArea', title: '快递区域', align: 'center', width: 100 },
                     { field: 'FedexType', title: '快递类型', align: 'center', width: 100 },
                      { field: 'ReceiveName', title: '收件人姓名', align: 'center', width: 100 },
                      { field: 'FedexAddress', title: '邮寄地址', align: 'center', width: 100 },
                      { field: 'FedexStatu', title: '快递状态', align: 'center', width: 100 },
                      {
                          field: 'operation', title: '操作', align: 'center', width: 100,
                          formatter: function (value, row, index) {
                              var str = "";
                              str += '<a href="javascript:update(\'' + Id + '\')" class="easyui-linkbutton c3" style="width:50px">审批</a>';
                              str += '<a href="javascript:view(\'' + Id + '\');" class="easyui-linkbutton c4" tyle="width:50px" >查看</a>';                              
                              return str;
                          }
                      }
                ]],
                //toolbar: [{
                //    id: 'btnAdd',
                //    text: '添加',
                //    iconCls: 'icon-add',
                //    handler: function () {

                //    }
                //}],
            });
        }
    </script>
    <style>
        body {
            font-size: 12px;
            overflow-y: hidden;
        }

        input {
            width: 100px;
        }

        select {
            width: 104px;
        }

        #sec {
            /*border:1px solid #0094ff;*/
            width: 1000px;
        }

            #sec td {
                width: 100px;
                height: 20px;
                text-align: right;
            }
    </style>
</head>
<body>


    <div>
        <table id="sec">
            <tr>
                <td>开始时间:</td>
                <td><input type="datetime" id="CreationTime" class="easyui-datebox" /></td>
                <td>结束时间:</td>
                <td><input type="datetime" id="EndTime" class="easyui-datebox" /></td>
                <td>国&nbsp;际:</td>
                <td>
                    <select name="FedexArea" class="easyui-combobox" id="FedexArea">
                        <option>请选择</option>
                        <option value="美国">美国</option>
                        <option value="加拿大">加拿大</option>
                    </select>
                </td>
                <td>国&nbsp;内:</td>
                <td>
                    <select name="FedexArea1" class="easyui-combobox" id="FedexArea1">
                        <option>请选择</option>
                        <option value="北京">北京</option>
                        <option value="上海">上海</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td>申请人:</td>
                <td><input type="text" id="CreationUser" class="easyui-textbox" /></td>
                <td>快递状态:</td>
                <td>
                    <select name="FedexSatu" class="easyui-combobox" id="FedexSatu">
                        <option>请选择</option>
                        <option value="文件">待审批</option>
                        <option value="物品">已审批</option>
                        <option value="物品">已发送</option>
                        <option value="物品">待修改</option>
                    </select>
                </td>
                <td>快递类型:</td>
                <td>
                    <select name="FedexType" class="easyui-combobox" id="FedexType">
                        <option>请选择</option>
                        <option value="文件">文件</option>
                        <option value="物品">物品</option>
                    </select>
                </td>                
                <td>
                    <a href="javascript:void(0)" id="btnSerach" class="easyui-linkbutton c1" style="width:70px">查询</a>
                </td>
            </tr>
        </table>
    </div>
    <table id="date"></table>
</body>
</html>
